<body>
<div class="path fn-clear"><span>目录</span><a href="{url('themes/selecttpl',array(id=>$frameid))}">根目录</a>    
{loop $path $key $vo}
<?php
    if($key){
        $pathdir = $pathdir.'/'.$vo;
    }else{
        $pathdir = $vo;
    }
?>
    <a href="{url('themes/selecttpl',array(dir=>$pathdir,id=>$frameid))}">{$vo}</a>
{/loop}
    </div>
<div class="w600 m5 h400" style="overflow-y:auto">
<table class="table table-bordered table-striped" width="100%">
<thead><tr><th class="tac w60">属性</th><th class="tal">名称</th></tr></thead>
<tbody>
{loop $tpldir $vo}
<tr>
    <td class="tac">目录</td>
    <td class="tal"><i class="iconfont f14 blue" title="文件夹">&#xF032;</i> <a title="文件夹" href="{url('themes/selecttpl',array(dir=>$dirpath.$vo,id=>$frameid))}" class="fb f14">{$vo}</a>
</td>
</tr>
{/loop}
{loop $tpllist $vo}
<tr>
    <td class="tac">.PHP</td>
    <td class="tal"><i class="iconfont f18 blue" title="文件">&#xF031;</i> <a href="###" title="选择模板" class="pt" tpl="{$dirpath}{current(explode('.', $vo))}">{$vo}</a></td>
</tr>
{/loop}
</tbody>
</table>
</div>
<script language="javascript">
Do('Dialog',function(){
    $('.pt').click(function(){
        var origin = artDialog.open.origin;
        var aValue = $(this).attr("tpl");
        var input = origin.document.getElementById('{$frameid}');
        input.value = aValue;
        input.select();
        $.dialog.close()
    })
})
</script>
</body>